package Reflection;

import Static.Test;

import java.io.Serializable;

//通过反射获取类的完整结构
public class Demo3<T> implements Serializable {
    private char gender;
    public double weight;

    public void breath(){
        System.out.println("生物呼吸");
    }

    public void eat(){
        System.out.println("生物吃东西");
    }
}
class Person1 extends Demo3<String> implements Comparable<String>,MyInterFace{

    private String name;
    int age;
    public int id;

    public Person1(){

    }

    private Person1(String name){
        this.name=name;
    }

    Person1(String name,int age){
        this.name=name;
        this.age=age;
    }

    private String show(String nation){
        System.out.println("我的国籍："+nation);
        return nation;
    }

    public String display(String interests){
        return interests;
    }
    @Override
    public void info() {
        System.out.println("我是一个人");
    }

    @Override
    public int compareTo(String o) {
        return 0;
    }
}